package com.chainyoung.common.appcommon.hdwallet;

import java.util.HashMap;

/**
 * 以太坊交易记录
 */
public class CommonTokens {
    private static HashMap<String, String> map = new HashMap<>();

    static {
        map.put("0xc478f1eff4791101a25f3259c2eaa74d1f231d52", "TWCC");
        map.put("0x9ce40fb807eaf4ab3712c7d8797ee8107b36c46e", "fck.com FCK");
        map.put("0xcd32b7e3931cbf324352931748fdfaf6bf7e0189", "MG");
    }


    public static String getTokenNameByAddr(String addr) {
        if (map.containsKey(addr)) {
            return map.get(addr);
        } else {
            return addr.substring(0, 4) + "..." + addr.substring(addr.length() - 4);
        }
    }

}
